/*
 * @author: sanbao
 * @Date: 2022-07-25 15:10:06
 */
interface categoriesInt {
    cat_deleted: boolean
    cat_id: number
    cat_level: number
    cat_name: string
    cat_pid: number
    children?: childrenInt[]
}
interface childrenInt {
    cat_deleted: boolean
    cat_id: number
    cat_level: number
    cat_name: string
    cat_pid: number
}
// toplist
type toplistInt = {
    type: string,
    model?: string,
    label?: string,
    action?: string,
    list?: [{
        type: string
        name: string
        action: string
    }]
}
// 分页
interface pagerInt {
    currentPage: number
    pageSize: number
    total: number
    pageSizes: [number, number, number]
}
// tablelist
type tablelistInt = {
    type?: string
    label: string
    prop?: string
    width?: string
    list?: [
        {
            type: string
            action: string
            name: string
        },
        {
            type: string
            action: string
            name: string
        }
    ]
}
// 分页
interface pagerInt {
    currentPage: number
    pageSize: number
    total: number
    pageSizes: [number, number, number]
}
export class CategoriesData {
    // 分页
    pager: pagerInt = {
        currentPage: 1,
        pageSize: 5,
        total: 0,
        pageSizes: [5, 10, 15],
    }
    // top数据
    toplist: toplistInt[] = [
        {
            type: "action",
            list: [
                {
                    type: 'primary',
                    name: "添加角色",
                    action: "add",
                }
            ]
        }
    ]
    // topdata

    // table
    tableData: categoriesInt[] = []
    tablelist: tablelistInt[] = [
        {
            type: "index",
            label: "#",
        },
        {
            label: "分类名称",
            prop: "cat_name",
        },
        {
            label: "是否有效",
            type: "cat_deleted",
        },
        {
            label: "分类排序",
            type: "cat_level",
        },
        {
            label: "操作",
            type: 'action',
            list: [{
                type: "primary",
                action: "edit",
                name: "编辑",
            },
            {
                type: "danger",
                action: "delete",
                name: "删除",
            }
            ]
        }
    ]
}